//===================================
//File: Point.h
//Definition class Point
//Name: Smirnova O.P.
//Date: 01.07.11, v.1.0
//===================================
#ifndef POINT_H
#define POINT_H
#include <iostream>

#include <math.h>

class Point
{
private:
	float x,y; // decart system
	float r,fi; // polar system
	void convertToPolar(); // convert decart to polar
	void convertToDecart(); // convert polar to decart
public:
	Point(){Point(0,0,0);  /*"Point: constructor for init Point."*/ ;}; // empty constr for init
	Point(float f1,float f2,short isPolar); // constructor 1,2 - if isPolar=false (x,y), else (r,fi)
	~Point(); // destructor
	float getX(); // getting X
	float getY(); // getting Y
	float getR(); // getting R
	float getFI(); // getting FI
	void setR(float r);  // setting R
	void setFI(float fi); // setting FI
	void moveToPoint(Point destP); // set current x,y to variables x,y
	void moveTodXdY(double dx,double dy); // move current x,y to variables dx,dy
	void writePoint();
	void consSP(Point &SP);
	int operator >(int); 
	friend std::ostream& operator<<(std::ostream&,Point p);
};



#endif













